import { pubRequire } from '@utils/public'
const baseUrl = '/activities/flowers'
/*鲜花活动列表*/
export function getFlowerActiveList(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}`, obj, callbBack, errBack)
}
// 编辑鲜花活动排序
export function sortActive(id, obj, callbBack, errBack) {
  return pubRequire('put', `${baseUrl}/${id}/sort`, obj, callbBack, errBack)
}
// 结束开启鲜花活动
export function endActive(obj, callbBack, errBack) {
  return pubRequire('put', `${baseUrl}/${obj.id}/end`, obj, callbBack, errBack)
}
// 删除鲜花活动
export function delActive(obj, callbBack, errBack) {
  return pubRequire('delete', `${baseUrl}/${obj.id}`, obj, callbBack, errBack)
}

// 立即开启鲜花活动
export function startActive(obj, callbBack, errBack) {
  return pubRequire('put', `${baseUrl}/${obj.id}/start`, obj, callbBack, errBack)
}

// 鲜花活动数据统计明细表格
export function getDataList(id,obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/${id}/data`, obj, callbBack, errBack)
}

// 鲜花活动数据折线图统计明细
export function getDataChart(obj, callbBack, errBack) {
  return pubRequire('get', `${baseUrl}/${obj.id}/data-chart`, obj, callbBack, errBack)
}